package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EmployeeBillingItemsMapper;
import com.ruoyi.system.domain.EmployeeBillingItems;
import com.ruoyi.system.service.IEmployeeBillingItemsService;

/**
 * 员工计费项配置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-23
 */
@Service
public class EmployeeBillingItemsServiceImpl implements IEmployeeBillingItemsService
{
    @Autowired
    private EmployeeBillingItemsMapper employeeBillingItemsMapper;

    /**
     * 通过id查询员工计费项配置
     *
     * @param id 员工计费项配置主键
     * @return 员工计费项配置
     */
    @Override
    public EmployeeBillingItems selectEmployeeBillingItemsById(Long id)
    {
        return employeeBillingItemsMapper.selectEmployeeBillingItemsById(id);
    }

    /**
     * 查询员工计费项配置列表
     *
     * @param employeeBillingItems 员工计费项配置
     * @return 员工计费项配置
     */
    @Override
    public List<EmployeeBillingItems> selectEmployeeBillingItemsList(EmployeeBillingItems employeeBillingItems)
    {
        return employeeBillingItemsMapper.selectEmployeeBillingItemsList(employeeBillingItems);
    }

    /**
     * 新增员工计费项配置
     *
     * @param employeeBillingItems 员工计费项配置
     * @return 结果
     */
    @Override
    public int insertEmployeeBillingItems(EmployeeBillingItems employeeBillingItems)
    {
        employeeBillingItems.setCreateTime(DateUtils.getNowDate());
        return employeeBillingItemsMapper.insertEmployeeBillingItems(employeeBillingItems);
    }

    /**
     * 修改员工计费项配置
     *
     * @param employeeBillingItems 员工计费项配置
     * @return 结果
     */
    @Override
    public int updateEmployeeBillingItems(EmployeeBillingItems employeeBillingItems)
    {
        employeeBillingItems.setUpdateTime(DateUtils.getNowDate());
        return employeeBillingItemsMapper.updateEmployeeBillingItems(employeeBillingItems);
    }

    /**
     * 通过id批量删除员工计费项配置信息
     *
     * @param ids 需要删除的员工计费项配置主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeBillingItemsByIds(Long[] ids)
    {
        return employeeBillingItemsMapper.deleteEmployeeBillingItemsByIds(ids);
    }

    /**
     * 通过id删除员工计费项配置信息
     *
     * @param id 员工计费项配置主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeBillingItemsById(Long id)
    {
        return employeeBillingItemsMapper.deleteEmployeeBillingItemsById(id);
    }
}
